
import 'dart:math';

class RandomCode {

 String randomcode(int length)
 {
       String alphabet = "0123456789";
       String alphabet1= "123456789";
       int strlenght = length; /// 生成的字符串固定长度
        String left = '';
       left= alphabet1[Random().nextInt(alphabet1.length)];
       left+= alphabet1[Random().nextInt(alphabet1.length)];
       for (var i = 0; i < strlenght-2; i++) {
//    right = right + (min + (Random().nextInt(max - min))).toString();
     left = left + alphabet[Random().nextInt(alphabet.length)];
   }
   return left;
 }
}